/**
 * 
 */
package soa.security.mgr.service;

import java.util.List;

import soa.security.domain.Person;
import soa.security.domain.Role;
import soa.security.exception.OrganizationException;
import soa.security.mgr.service.base.BaseMgrService;
import soa.security.ws.base.ModelAdapter;

/**
 * @author CreGu
 *
 */
public interface RoleMgrService extends BaseMgrService, ModelAdapter<Role> {

	void addRole(String organizationId, Role bean) throws OrganizationException;

	void updateRole(String organizationId, Role a) throws OrganizationException;

	List<Role> allRoles(String organizationId) throws OrganizationException;

	List<Role> getRole(String organizationId, String roleId)
			throws OrganizationException;

	boolean addPersons(String organizationId, String roleId, String personIds)
			throws OrganizationException;

	boolean removePersons(String organizationId, String roleId, String personIds)
			throws OrganizationException;

	List<Person> allPersons(String organizationId, String roleId)
			throws OrganizationException;

	boolean addSubRoles(String organizationId, String roleId, String subRoleIds)
			throws OrganizationException;

	boolean removeSubRoles(String organizationId, String roleId,
			String subRoleIds) throws OrganizationException;

	boolean removeAllSubRoles(String organizationId, String roleId)
			throws OrganizationException;

	List<Role> allSubRoles(String organizationId, String roleId)
			throws OrganizationException;

	Role findByDn(String dn) throws OrganizationException;

	boolean deleteByDn(String dn) throws OrganizationException;

	void addOrRemove(String organizationId, String roleId, String personIds);

	void addOrRemoveSub(String organizationId, String roleId, String subRoleIds);

}
